package com.labreeze.spring.aop.advisor;

import java.util.ArrayList;
import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.labreeze.spring.aop.advice.Waiter;

public class TestAdvisor {

	
	public static void main(String[] args) {
//		
		ApplicationContext ac=new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
		Waiter waiter=(Waiter)ac.getBean("waiter");
		waiter.greetTo("mary");
//		waiter.serverTo("july");
		
		waiter.greetTo("andy");
		
		List<String> list=new ArrayList<String>();
		list.add("ad");
		list.add("bd");
		list.add("cd");
		list.add("id");
		list.add("md");
		list.add("pd");
		list.add("sd");
		list.add("td");
		list.add("ud");
		list.add("zd");
		
		String sql="imp test/test@tmp157ora11g file=test.dmp fromuser=test touser=test log=test_imp.log";
		for(String name:list){
			String test=sql.replaceAll("test", name);
			System.out.println(test);
		}
	}
}
